\(\int (b \csc (e+f x))^m \tan ^4(e+f x) \, dx\) [379]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (warning: unable to verify)
   Maple [F]
   Fricas [F]
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 19, antiderivative size = 63 \[ \int (b \csc (e+f x))^m \tan ^4(e+f x) \, dx=\frac {(b \csc (e+f x))^m \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},\frac {1}{2} (-3+m),-\frac {1}{2},\cos ^2(e+f x)\right ) \sin ^2(e+f x)^{\frac {1}{2} (-3+m)} \tan ^3(e+f x)}{3 f} \]

[Out]

1/3*(b*csc(f*x+e))^m*hypergeom([-3/2, -3/2+1/2*m],[-1/2],cos(f*x+e)^2)*(sin(f*x+e)^2)^(-3/2+1/2*m)*tan(f*x+e)^
3/f

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {2697} \[ \int (b \csc (e+f x))^m \tan ^4(e+f x) \, dx=\frac {\tan ^3(e+f x) \sin ^2(e+f x)^{\frac {m-3}{2}} (b \csc (e+f x))^m \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},\frac {m-3}{2},-\frac {1}{2},\cos ^2(e+f x)\right )}{3 f} \]

[In]

Int[(b*Csc[e + f*x])^m*Tan[e + f*x]^4,x]

[Out]

((b*Csc[e + f*x])^m*Hypergeometric2F1[-3/2, (-3 + m)/2, -1/2, Cos[e + f*x]^2]*(Sin[e + f*x]^2)^((-3 + m)/2)*Ta
n[e + f*x]^3)/(3*f)

Rule 2697

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*Sec[e + f
*x])^m*(b*Tan[e + f*x])^(n + 1)*((Cos[e + f*x]^2)^((m + n + 1)/2)/(b*f*(n + 1)))*Hypergeometric2F1[(n + 1)/2,
(m + n + 1)/2, (n + 3)/2, Sin[e + f*x]^2], x] /; FreeQ[{a, b, e, f, m, n}, x] &&  !IntegerQ[(n - 1)/2] &&  !In
tegerQ[m/2]

Rubi steps \begin{align*} \text {integral}& = \frac {(b \csc (e+f x))^m \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},\frac {1}{2} (-3+m),-\frac {1}{2},\cos ^2(e+f x)\right ) \sin ^2(e+f x)^{\frac {1}{2} (-3+m)} \tan ^3(e+f x)}{3 f} \\ \end{align*}

Mathematica [B] (warning: unable to verify)

Leaf count is larger than twice the leaf count of optimal. \(240\) vs. \(2(63)=126\).

Time = 8.73 (sec) , antiderivative size = 240, normalized size of antiderivative = 3.81 \[ \int (b \csc (e+f x))^m \tan ^4(e+f x) \, dx=-\frac {\cos (e+f x) (b \csc (e+f x))^m \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3}{2},\cos ^2(e+f x)\right ) \sin (e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1+m)}}{f}+\frac {4 (b \csc (e+f x))^m \left (\frac {m \operatorname {Hypergeometric2F1}\left (1-m,\frac {1}{2}-\frac {m}{2},\frac {3}{2}-\frac {m}{2},-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \sec ^2\left (\frac {1}{2} (e+f x)\right )^{-m} \tan \left (\frac {1}{2} (e+f x)\right )}{-1+m}-\frac {1}{2} \tan (e+f x)\right )}{f}+\frac {(b \csc (e+f x))^m \operatorname {Hypergeometric2F1}\left (-1-\frac {m}{2},\frac {1}{2}-\frac {m}{2},\frac {3}{2}-\frac {m}{2},-\tan ^2(e+f x)\right ) \sec ^2(e+f x)^{-m/2} \tan (e+f x)}{f (1-m)} \]

[In]

Integrate[(b*Csc[e + f*x])^m*Tan[e + f*x]^4,x]

[Out]

-((Cos[e + f*x]*(b*Csc[e + f*x])^m*Hypergeometric2F1[1/2, (1 + m)/2, 3/2, Cos[e + f*x]^2]*Sin[e + f*x]*(Sin[e
+ f*x]^2)^((-1 + m)/2))/f) + (4*(b*Csc[e + f*x])^m*((m*Hypergeometric2F1[1 - m, 1/2 - m/2, 3/2 - m/2, -Tan[(e
+ f*x)/2]^2]*Tan[(e + f*x)/2])/((-1 + m)*(Sec[(e + f*x)/2]^2)^m) - Tan[e + f*x]/2))/f + ((b*Csc[e + f*x])^m*Hy
pergeometric2F1[-1 - m/2, 1/2 - m/2, 3/2 - m/2, -Tan[e + f*x]^2]*Tan[e + f*x])/(f*(1 - m)*(Sec[e + f*x]^2)^(m/
2))

Maple [F]

\[\int \left (b \csc \left (f x +e \right )\right )^{m} \left (\tan ^{4}\left (f x +e \right )\right )d x\]

[In]

int((b*csc(f*x+e))^m*tan(f*x+e)^4,x)

[Out]

int((b*csc(f*x+e))^m*tan(f*x+e)^4,x)

Fricas [F]

\[ \int (b \csc (e+f x))^m \tan ^4(e+f x) \, dx=\int { \left (b \csc \left (f x + e\right )\right )^{m} \tan \left (f x + e\right )^{4} \,d x } \]

[In]

integrate((b*csc(f*x+e))^m*tan(f*x+e)^4,x, algorithm="fricas")

[Out]

integral((b*csc(f*x + e))^m*tan(f*x + e)^4, x)

Sympy [F]

\[ \int (b \csc (e+f x))^m \tan ^4(e+f x) \, dx=\int \left (b \csc {\left (e + f x \right )}\right )^{m} \tan ^{4}{\left (e + f x \right )}\, dx \]

[In]

integrate((b*csc(f*x+e))**m*tan(f*x+e)**4,x)

[Out]

Integral((b*csc(e + f*x))**m*tan(e + f*x)**4, x)

Maxima [F]

\[ \int (b \csc (e+f x))^m \tan ^4(e+f x) \, dx=\int { \left (b \csc \left (f x + e\right )\right )^{m} \tan \left (f x + e\right )^{4} \,d x } \]

[In]

integrate((b*csc(f*x+e))^m*tan(f*x+e)^4,x, algorithm="maxima")

[Out]

integrate((b*csc(f*x + e))^m*tan(f*x + e)^4, x)

Giac [F]

\[ \int (b \csc (e+f x))^m \tan ^4(e+f x) \, dx=\int { \left (b \csc \left (f x + e\right )\right )^{m} \tan \left (f x + e\right )^{4} \,d x } \]

[In]

integrate((b*csc(f*x+e))^m*tan(f*x+e)^4,x, algorithm="giac")

[Out]

integrate((b*csc(f*x + e))^m*tan(f*x + e)^4, x)

Mupad [F(-1)]

Timed out. \[ \int (b \csc (e+f x))^m \tan ^4(e+f x) \, dx=\int {\mathrm {tan}\left (e+f\,x\right )}^4\,{\left (\frac {b}{\sin \left (e+f\,x\right )}\right )}^m \,d x \]

[In]

int(tan(e + f*x)^4*(b/sin(e + f*x))^m,x)

[Out]

int(tan(e + f*x)^4*(b/sin(e + f*x))^m, x)